<!doctype html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta charset="UTF-8">
    <title>人员管理</title>
    <link href="../lib/layui/css/layui.css" rel="stylesheet" type="text/css" media="screen"/>
    <script src="../lib/jquery-3.3.1.min.js" type="text/javascript"></script>
    <script src="../lib/layui/layui.js" type="text/javascript"></script>
    <script src="../js/basicinfo/basicUser.js" type="text/javascript"></script>
    <script src="../lib/exportExcelUtil.js" type="text/javascript"></script>
    <script src="../lib/idCardVertify.js" type="text/javascript"></script>
</head>
<body class="layui-layout-body" style="background-color:white;">
<div class="layui-layout layui-layout-admin"  >
        <div class="query" style="padding-top: 10px; padding-left: 10px;">
            <div class="layui-inline">
                <div class="layui-form">
                    <div class="layui-input-inline">
                        身份：
                    </div>
                    <div class="layui-input-inline" style="width: 80px;">
                        <select name="s_user_type" id="s_user_type" lay-verify="required"  lay-filter="blockId" >
                            <option value="">全部</option>
                            <option value="11">业主</option>
                            <option value="13">租客</option>
                        </select>
                    </div>
                    <div class="layui-input-inline">
                        所属楼栋：
                    </div>
                    <div class="layui-input-inline" style="width: 120px;">
                        <select name="s_user_blockId" id="s_user_blockId" lay-verify="required" lay-filter="s_user_blockId" lay-search="">
                            <option value="">全部</option>
                        </select>
                    </div>
                    <div class="layui-input-inline">
                        所在房间：
                    </div>
                    <div class="layui-input-inline" style="width: 120px;">
                        <select name="s_user_room_id" id="s_user_room_id" lay-verify="required" lay-filter="blockId" >
                            <option value="">全部</option>
                        </select>
                    </div>
                    <div class="layui-input-inline">
                        <input id="searchBlockName_user"  class="layui-input" autocomplete="off" placeholder="请输入姓名进行搜索">
                    </div>
                </div>
            </div>
            <button class="layui-btn " lay-submit lay-filter="search_user"  id="reloadUser">查询</button>
            <button class="layui-btn"  type="button" onclick="reloadUser()">刷新</button>
            <button class="layui-btn"  type="button" onclick="addUser()">添加</button>
            <button class="layui-btn"  type="button" id="sync" >同步</button>
            <button class="layui-btn"  type="button" id="import">批量导入</button>
            <button class="layui-btn"  type="button" id="exportAll" >导出全部</button>
        </div>
        <div id="content">
            <table class="layui-table" id="basicUserTable"  lay-filter="basicUserTable"></table>
        </div>
<!--    </div>-->

    <!-- 用户信息增加页面 -->
    <div style="display:none;overflow: visible;" id="userAdd" >
        <form id="product_form" lay-filter="product_form" class="layui-form"  action="" style="padding: 20px;overflow: visible;">
            <input type="hidden" id="userId" name="userId">
            <input type="hidden" id="fafId" name="userFingerprint">
            <div class="layui-form-item"   >
                <div class="layui-inline"  >
                    <label class="layui-form-label">所属楼栋<span style="color:red">*</span></label>
                    <div class="layui-input-inline">
                        <select name="userBlockId" id="userBlockId" lay-verify="required" lay-filter="userBlockId" lay-search="">
                        </select>
                    </div>
                </div>
            </div>
            <div class="layui-form-item" >
                <label class="layui-form-label">房间<span style="color:red">*</span></label>
                <div class="layui-input-inline">
                    <select name="userRoomId" id="userRoomId" lay-verify="required" lay-filter="userRoomId" lay-search="">
                    </select>
                </div>
            </div>
            <input style="display: none" id="userRoomName" name="userRoomName">
            <input style="display: none" id="userBlockName" name="userBlockName">
            <div class="layui-form-item">
                <div class="layui-inline">
                    <label class="layui-form-label">姓名<span style="color:red">*</span></label>
                    <div class="layui-input-inline">
                        <input type="text" name="userName" maxlength="20" placeholder="名称最长20字" lay-verify="required" autocomplete="off"
                               class="layui-input">
                    </div>
                </div>
            </div>
            <div class="layui-form-item">
                <div class="layui-inline">
                    <label class="layui-form-label">性别<span style="color:red">*</span></label>
                    <div class="layui-input-inline">
                        <select name="gender" id="gender" lay-verify="required" >
                            <option value="1">男</option>
                            <option value="2">女</option>
                        </select>
                    </div>
                </div>
            </div>
            <div class="layui-form-item">
                <div class="layui-inline">
                    <label class="layui-form-label">电话<span style="color:red">*</span></label>
                    <div class="layui-input-inline">
                        <input type="text" name="userPhone" maxlength="11" placeholder="输入电话号码" lay-verify="required|phone" autocomplete="off"
                               class="layui-input">
                    </div>
                </div>
            </div>
            <div class="layui-form-item">
                <div class="layui-inline">
                    <label class="layui-form-label">证件类型</label>
                    <div class="layui-input-inline">
                        <select name="userCardType" id="userCardType" lay-filter="userCardType" >
                            <option value="1">身份证</option>
<!--                            <option value="2">护照</option>-->
<!--                            <option value="3">驾照</option><option value="4">其他</option>-->
                        </select>
                    </div>
                </div>
            </div>
            <div class="layui-form-item">
                <div class="layui-inline">
                    <label class="layui-form-label">证件号</label>
                    <div class="layui-input-inline">
                        <input type="text" name="userCard" id="userCard" maxlength="30" placeholder="输入证件号码"  autocomplete="off"
                               class="layui-input" >
                    </div>
                </div>
            </div>
            <div class="layui-form-item">
                <div class="layui-inline">
                    <label class="layui-form-label">户籍地址</label>
                    <div class="layui-input-inline">
                        <input type="text" name="userDoorCard" placeholder="输入户籍地址" maxlength="80" autocomplete="off"
                               class="layui-input">
                    </div>
                </div>
            </div>
            <div class="layui-form-item">
                <div class="layui-inline">
                    <label class="layui-form-label">人员类型<span style="color:red">*</span></label>
                    <div class="layui-input-inline">
                        <select name="userType" id="userType" lay-verify="required" lay-filter="userType" >
                            <option value="11">业主</option>
                            <option value="13">租客</option>
                        </select>
                    </div>
                </div>
            </div>
            <div class="layui-form-item">
                <div class="layui-inline">
                    <label class="layui-form-label">户主关系<span style="color:red">*</span></label>
                    <div class="layui-input-inline">
                        <select name="hushaiConsistent" id="hushaiConsistent" lay-verify="required" lay-filter="userType" >
                            <option value="0">人户一致</option>
                            <option value="1">人户分离</option>
                            <option value="2">流动人口</option>
                        </select>
                    </div>
                </div>
            </div>
            <div class="layui-form-item">
                <div class="layui-inline">
                    <label class="layui-form-label">政治面貌<span style="color:red">*</span></label>
                    <div class="layui-input-inline">
                        <select name="partyMembership" id="partyMembership" lay-verify="required" lay-filter="userType" >
                            <option value="0">党员</option>
                            <option value="1">群众</option>
                            <option value="2">其他</option>
                        </select>
                    </div>
                </div>
            </div>
            <div class="layui-form-item">
                <div class="layui-inline">
                    <label class="layui-form-label">年龄</label>
                    <div class="layui-input-inline">
                        <input type="text" name="age" id="userAge" placeholder=""  autocomplete="off"
                               class="layui-input" >
                    </div>
                </div>
            </div>

            <div class="layui-form-item">
                <div class="layui-inline">
                    <label class="layui-form-label">人脸信息</label>
                    <div class="layui-upload" style="margin-left: 110px;">
                        <input type="hidden" name="userFaceInfo"  id="userFaceInfo"/>
                        <div class="layui-input-inline" >
                            <button type="button" class="layui-btn" id="uploadBtn" name="uploadBtn">上传人脸</button>
                            <p id="demoText2" class="mt10" ></p>
                        </div>
                        <div class="layui-upload-list">
                            <img class="layui-upload-img" alt="" style="width: 92px;height: 92px;margin: 0 10px 10px 0;  " id="demo1">
                        </div>
                    </div>
                </div>
                <input type="file" name="file" style="display:none" class="layui-btn" id="uploadImg">
            </div>
            <div class="layui-form-item mt30">
                <div class="layui-input-block">
                    <button class="layui-btn" lay-submit="" id="basic_form" lay-filter="basic_up">提交</button>
                    <button class="layui-btn" lay-submit="" id="basic_up" lay-filter="basic_up">更新</button>
                    <button type="reset" class="layui-btn layui-btn-primary">重置</button>
                </div>
            </div>
        </form>
    </div>

    <div style="display:none;" id="familyMemberDiv" >
        <input type="hidden" id="userMType"/>
        <div>
            <table class="layui-table" id="memberUserTable"  lay-filter="memberUserTable"></table>
        </div>
    </div>

    <div style="display:none;" id="icCardDiv" >
        <div>
            <table class="layui-table" id="icCardTable"  lay-filter="icCardTable"></table>
        </div>
    </div>

    <!--  批量导入  -->
    <div id="upload" style="display: none">
        <div>
            <p style="display: none;"><a id="downButton" target="_blank" href="../web/acs/downfile/userTemplate.xlsx">1.下载模板  </a></p>
        </div>
        <form class="layui-form" style="margin-top:5%;margin-left: 1%">
            <input style="display: none" id="id">
            <div class="layui-input-inline" style="margin-left: 20px;margin-top: 2px;">
                <input type="text" id="file_name" name="file" lay-verify="required" style="width: 350px"  readonly autocomplete="off" class="layui-input">
            </div>
            <button type="button" class="layui-btn" id="uploadProductBtn">
                <i class="layui-icon">&#xe67c;</i>上传文件
            </button>
            <input type="file" style="display:none" class="layui-btn" id="uploadExcel">
            <button class="layui-btn" id="upload_form" lay-submit="" lay-filter="upload_form">提交</button>
            <button class="layui-btn" id="down_user_template" type="button"  >模板下载</button>
        </form>
    </div>

</div>
<div style="display:none;overflow: visible;" id="memberAddDiv" >
    <form id="memberAddForm" lay-filter="memberAddForm" class="layui-form"  action="" style="padding: 20px;overflow: visible;">
        <input type="hidden" name="userRoomId" id="memberRoomId"/>
        <input type="hidden" name="userRoomName" id="memberRoomName"/>
        <input type="hidden" name="userBlockName" id="memberBlockName"/>
        <input type="text" style="display: none" name="userId" id="memberUserId"/>
        <input type="hidden" name="userBlockId" id="memberBlockId"/>
        <input type="hidden" name="companyId" id="memberCompanyId"/>
        <input type="hidden" name="parentId" id="memberParentId"/>
        <input type="hidden" id="fafId2" name="userFingerprint">
        <div class="layui-form-item">
            <div class="layui-inline">
                <label class="layui-form-label">姓名<span style="color:red">*</span></label>
                <div class="layui-input-inline">
                    <input type="text" name="userName" maxlength="20" placeholder="名字最长20字" lay-verify="required" autocomplete="off"
                           class="layui-input">
                </div>
            </div>
        </div>
        <div class="layui-form-item">
            <div class="layui-inline">
                <label class="layui-form-label">性别<span style="color:red">*</span></label>
                <div class="layui-input-inline">
                    <select name="gender" id="memberGender" lay-verify="required" >
                        <option value="1">男</option>
                        <option value="2">女</option>
                    </select>
                </div>
            </div>
        </div>
        <div class="layui-form-item">
            <div class="layui-inline">
                <label class="layui-form-label">身份<span style="color:red">*</span></label>
                <div class="layui-input-inline">
                    <select name="userType" id="memberType" lay-verify="required" >
                        <option value="12">家庭成员</option>
                    </select>
                </div>
            </div>
        </div>
        <div class="layui-form-item">
            <div class="layui-inline">
                <label class="layui-form-label">电话<span style="color:red">*</span></label>
                <div class="layui-input-inline">
                    <input type="text" name="userPhone" maxlength="11" placeholder="输入电话号码" lay-verify="required|phone" autocomplete="off"
                           class="layui-input">
                </div>
            </div>
        </div>

        <div class="layui-form-item">
            <div class="layui-inline">
                <label class="layui-form-label">身份证号</label>
                <div class="layui-input-inline">
                    <input type="text" name="userCard" id="userCard2" maxlength="30" placeholder="输入身份证号"  autocomplete="off"
                           class="layui-input">
                </div>
            </div>
        </div>
        <div class="layui-form-item">
            <div class="layui-inline">
                <label class="layui-form-label">户籍地址</label>
                <div class="layui-input-inline">
                    <input type="text" name="userDoorCard" placeholder="输入户籍地址" maxlength="80" autocomplete="off"
                           class="layui-input">
                </div>
            </div>
        </div>
        <div class="layui-form-item">
            <div class="layui-inline">
                <label class="layui-form-label">人户关系<span style="color:red">*</span></label>
                <div class="layui-input-inline">
                    <select name="hushaiConsistent" id="hushaiConsistent2" lay-verify="required" lay-filter="hushaiConsistent" >
                        <option value="0">人户一致</option>
                        <option value="1">人户分离</option>
                        <option value="2">流动人口</option>
                    </select>
                </div>
            </div>
        </div>
        <div class="layui-form-item" id="familyRelationshipDiv">
            <div class="layui-inline">
                <label class="layui-form-label">户主关系<span style="color:red">*</span></label>
                <div class="layui-input-inline">
                    <select name="familyRelationship" id="familyRelationship2" lay-verify="required" lay-filter="familyRelationship" >
                        <option value="0">父母</option>
                        <option value="1">子女</option>
                        <option value="2">夫妻</option>
                        <option value="3">孙辈</option>
                        <option value="4">亲属</option>
                        <option value="5">朋友</option>
                        <option value="6">祖父母</option>
                        <option value="7">外祖父母</option>
                    </select>
                </div>
            </div>
        </div>
        <div class="layui-form-item">
            <div class="layui-inline">
                <label class="layui-form-label">政治面貌<span style="color:red">*</span></label>
                <div class="layui-input-inline">
                    <select name="partyMembership" id="partyMembership2" lay-verify="required" lay-filter="partyMembership" >
                        <option value="0">党员</option>
                        <option value="1">群众</option>
                        <option value="2">其他</option>
                    </select>
                </div>
            </div>
        </div>
        <div class="layui-form-item">
            <div class="layui-inline">
                <label class="layui-form-label">年龄</label>
                <div class="layui-input-inline">
                    <input type="text" name="age" id="userAge2" placeholder=""  autocomplete="off"
                           class="layui-input" >
                </div>
            </div>
        </div>
        <div class="layui-form-item">
            <div class="layui-inline">
                <label class="layui-form-label">人脸信息</label>
                <div class="layui-upload" style="margin-left: 110px;">
                    <input type="hidden" name="userFaceInfo"  id="userFaceInfo2"/>
                    <div class="layui-input-inline" >
                        <button type="button" class="layui-btn" id="uploadBtn2" name="uploadBtn">上传人脸</button>
                        <p id="demoText" class="mt10" ></p>
                    </div>
                    <div class="layui-upload-list">
                        <img class="layui-upload-img" alt="" style="width: 92px;height: 92px;margin: 0 10px 10px 0;" id="demo2">
                    </div>
                </div>
            </div>
            <input type="file" name="file" style="display:none" class="layui-btn" id="uploadImg2">
        </div>

        <div class="layui-form-item mt30">
            <div class="layui-input-block">
                <button class="layui-btn" lay-submit="" id="memberAdd" lay-filter="memberSubmit">提交</button>
                <button class="layui-btn" lay-submit="" id="memberModify" lay-filter="memberSubmit">更新</button>
                <button type="reset" class="layui-btn layui-btn-primary">重置</button>
            </div>
        </div>
    </form>
</div>
<div style="display:none;overflow: visible;" id="ICCardAddDiv" >
    <form id="ICCardAddForm" lay-filter="memberAddForm" class="layui-form"  action="" style="padding: 20px;overflow: visible;">
        <input type="hidden" name="cardId" id="cardId"/>
        <input type="hidden" name="userId" id="icCardUserId"/>
        <input type="hidden" name="userType" value="2"/>
        <input type="hidden" name="companyId" id="icCardCompanyId"/>
        <div class="layui-form-item">
            <div class="layui-inline">
                <label class="layui-form-label">卡号<span style="color:red">*</span></label>
                <div class="layui-input-inline">
                    <input type="text" id="cardNO" name="cardNO" maxlength="10" placeholder="请输入10位卡号，唯一" lay-verify="required|number" autocomplete="off"
                           class="layui-input">
                </div>
            </div>
        </div>
        <div class="layui-form-item">
            <div class="layui-inline">
                <label class="layui-form-label">编号<span style="color:red">*</span></label>
                <div class="layui-input-inline">
                    <input type="text" id="identifier" name="identifier" maxlength="30" placeholder="请输入ic编号"  autocomplete="off"
                           class="layui-input">
                </div>
            </div>
        </div>
        <div class="layui-form-item">
            <div class="layui-inline">
                <label class="layui-form-label">过期日期</label>
                <div class="layui-input-inline">
                    <input type="text" name="time" id="time" placeholder="请选择过期日期"  autocomplete="off"
                           class="layui-input">
                </div>
            </div>
        </div>
        <div class="layui-form-item mt30">
            <div class="layui-input-block">
                <button class="layui-btn" lay-submit="" id="iCCardAdd" lay-filter="iCCardAdd">提交</button>
                <button type="reset" class="layui-btn layui-btn-primary">重置</button>
            </div>
        </div>
    </form>
</div>
<script type="text/html" id="toolbarMember">
    <div class="layui-btn-container">
        <button class="layui-btn" id="addMember" onclick="addMember()" >添加成员</button>
    </div>
</script>
<script type="text/html" id="toolbarIcCard">
    <div class="layui-btn-container">
        <button class="layui-btn" id="addIcCard" onclick="addIcCard()" >添加IC卡</button>
    </div>
</script>
</body>

</html>